﻿namespace PoolKit
{
    /// <summary>
    /// Strategy that is used to prepare resource for reuse when it's returned to the pool
    /// </summary>
    /// <typeparam name="TResource">Type of resource the strategy can handle</typeparam>
    public abstract class ReusePreparationStrategy<TResource> : ResourceStrategy
    {
        /// <summary>
        /// Prepares given resource for reuse - usually by wiping its state clean.
        /// </summary>
        /// <param name="resourceToBeReused">Resource to prepare for reuse</param>
        public abstract void PrepareForReuse(TResource resourceToBeReused);
    }
}